package com.telit.android.dto;

import com.baomidou.mybatisplus.annotation.TableLogic;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;


/**
 * @Auther amy
 * @Describe 护林员查询的DTO实体
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ForesterInfoDTO {

    private Integer id;

    @ApiModelProperty(value = "是否贫困")
    private Integer hasPoor;

    @ApiModelProperty(value = "经度")
    private String longitude;

    @ApiModelProperty(value = "纬度")
    private String latitude;
    @ApiModelProperty(value = "用户账号", dataType = "String")
    @NotNull(message = "该字段为必填项")
    @Size(max = 20, message = "该信息限定20个字符以内")
    private String username;

    @ApiModelProperty(value = "用户密码", dataType = "String")
    @Size(max = 32, message = "该信息限定32个字符以内")
    private String password;

    @ApiModelProperty(value = "用户昵称", dataType = "String")
    @NotNull(message = "该字段为必填项")
    @Size(max = 20, message = "该信息限定20个字符以内")
    private String nickname;

    @ApiModelProperty(value = "性别", dataType = "String")
    @Size(max = 2, message = "该信息限定2个字符以内")
    private String gender;

    @ApiModelProperty(value = "身份证号", dataType = "String")
    @Size(max = 20, message = "该信息限定20个字符以内")
    private String idCardNumber;
    @ApiModelProperty(value = "联系地址", dataType = "String")
    @Size(max = 255, message = "该信息限定255个字符以内")
    private String address;

    @ApiModelProperty(value = "邮箱地址", dataType = "String")
    @Size(max = 255, message = "该信息限定255个字符以内")
    private String email;

    @ApiModelProperty(value = "手机号码", dataType = "String")
    private String phone;

    @ApiModelProperty(value = "座机号码", dataType = "String")
    private String telphone;

    @ApiModelProperty(value = "政治面貌", dataType = "String")
    @Size(max = 10, message = "该信息限定10个字符以内")
    private String political;

    @ApiModelProperty(value = "出生年月", dataType = "String")
    @Size(max = 10, message = "该信息限定10个字符以内")
    private String birth;

    @ApiModelProperty(value = "籍贯", dataType = "String")
    @Size(max = 50, message = "该信息限定10个字符以内")
    private String nativePlace;

    @ApiModelProperty(value = "QQ号", dataType = "String")
    @Size(max = 15, message = "该信息限定15个字符以内")
    private String qqNumber;

    @ApiModelProperty(value = "行政区划编码")
    @NotNull(message = "行政区划为必选项")
    private String districtCode;

    @ApiModelProperty(value = "所属组织机构", dataType = "Integer")
    @NotNull(message = "组织机构为必选项")
    private Integer orgId;

    @ApiModelProperty(value = "是否禁用", dataType = "Boolean")
    @NotNull(message = "该字段为必填项")
    private Integer disabled;

    @ApiModelProperty(value = "是否删除", dataType = "Integer")
    @TableLogic(value = "'0'", delval = "'1'")
    private Integer deleted;

    @ApiModelProperty(value = "备注", dataType = "String")
    @Size(max = 255, message = "该信息限定255个字符以内")
    private String remark;

    @ApiModelProperty(value = "真实姓名")
    private String realname;

    @ApiModelProperty(value = "登录状态，0离线，1在线")
    private Integer loginStatus;

    @ApiModelProperty(value = "最后登录时间")
    private Date lastLoginTime;

    @ApiModelProperty(value = "登录类型，web，app端")
    private String loginType;

    @ApiModelProperty(value = "头像")
    private String picPath;

    @ApiModelProperty(value = "单位")
    private String unit;

    @ApiModelProperty(value = "职务")
    private String post;

    @ApiModelProperty(value = "当前登录时间")
    private Date curLoginTime;

    @ApiModelProperty(value = "排序")
    private Integer orderNum;

    @ApiModelProperty(value = "行政区划编码")
    private String adminstrationCode;

    @ApiModelProperty(value = "登录设备标识")
    private String equipmentId;

    @ApiModelProperty(value = "是否接收短信，默认false")
    private Integer sendSms;

    @ApiModelProperty(value = "年龄")
    private Integer age;

    @ApiModelProperty(value = "任务状态,2是任务中")
    private String Status;

    public ForesterInfoDTO(String districtCode, Integer status, String name){
        this.username = name;
        this.loginStatus = status;
        this.districtCode = districtCode;
    }
}
